package main

import "fmt"

type Logging interface {
	Log(msg string)
}

type Logger struct {
	Logging
}

type ErrorLog struct{}

func (log *ErrorLog) Log(msg string) {
	fmt.Println("[ERROR]: ", msg)
}

type InfoLog struct{}

func (log *InfoLog) Log(msg string) {
	fmt.Println("[INFO]: ", msg)
}

func main() {
	logger := &Logger{&InfoLog{}}
	logger.Log("Hello World!")
	logger.Logging = &ErrorLog{}
	logger.Log("Hello World!")
}
